package main

import (
	_ "gitee.com/micro-plat/dds/dds"
	"github.com/micro-plat/hydra"
	"github.com/micro-plat/hydra/hydra/servers/http"
)

var app = hydra.NewApp(
	hydra.WithPlatName("dds"),
	hydra.WithSystemName("apiserver"),
	hydra.WithServerTypes(http.API))

func main() {
	//检查配置是否正确
	app.OnStarting(func(conf hydra.IAPPConf) error {
		if _, err := hydra.C.DB().GetDB(); err != nil {
			return err
		}
		return nil
	})

	app.Start()
}
